package com.wanma.recuit.mapper;

import com.wanma.recuit.pojo.Apply;
import com.wanma.recuit.pojo.CompanyUser;
import com.wanma.recuit.pojo.Job;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface ApplyMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Apply record);

    int insertSelective(Apply record);

    Apply selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Apply record);

    int updateByPrimaryKey(Apply record);
    List<Apply> findPendingResume(@Param("jobId") Integer jobId, @Param("workId") Integer workId,
                                  @Param("eduId") Integer eduId, @Param("num") Integer num, @Param("companyUser") CompanyUser companyUser);
    List<Apply> findAcceptInterviewResume(@Param("startTime") Date startTime, @Param("endTime") Date endTime,
                                          @Param("num") Integer num, @Param("companyUser") CompanyUser companyUser);
    int findPendingResumeNumber(@Param("companyUser") CompanyUser companyUser, @Param("num") Integer num);
    void sendInterview(@Param("apply") Apply apply, @Param("acceptedTime") Date acceptedTime);
    void sendImproper(@Param("jobId") Integer jobId, @Param("userId") Integer userId, @Param("refusedTime") Date refusedTime);
    Integer findInterviewedResumeNumber(@Param("companyUser") CompanyUser companyUser);
}